/********************************************************************
	Coder: vincent
	E-Mail:	vincent213@live.cn
*********************************************************************/

using UnityEngine;
using System.Collections;

public class EffectDataProcess
{

	public int nCurCount;
	public float fLastPlayTime;
	
	public void AddCount()
	{
		nCurCount++;
		fLastPlayTime = Time.time;
	}
	public void Reset()
	{
		nCurCount = 0;
		fLastPlayTime = 0.0f;
	}
	
	public bool UpdateCount(float fTimeStep,int nMaxCount)
	{
		if(Time.time - fLastPlayTime > fTimeStep && nCurCount < nMaxCount)
		{
			nCurCount++;
			return true;
		}
			
		return false;
	}
}